class Info:
    def __init__(self, name, age):
        self.name = name
        self.age = age


def test_str():
    name = "abc !{} {} @ ok good thanks!  LOVE "
    name = name.format("jack", "zhao")
    print(name)
    print(name.find("@"))
    print(name.find("#"))
    print(name.replace("peter", "new peter"))
    print(name.split(" "))
    print(name.strip("!"))
    print(name.strip())
    print(name.upper())
    print(name.lower())
    print(name.title())
    print(name.startswith("abc"))
    print(name.endswith("LOVE"))
    print(name.join(["AAA", "FFF"]))
    split = ","
    print(split.join(["peter", "methew", "tcc"]))
    print(name.format("peter.zhao"))

    text = "dear {name} {age}"
    print(text.format(name="peter", age=20))


def get_data_type():
    print(type(1))  # int
    print(type('message'))  # str
    print(type(1.2))  # float
    print(type([1, 2, 3]))  # list
    print(type((4, 3, 2)))  # tuple
    print(type({'a': 30, "b": '32'}))  # dict
    info = Info(name="json", age=50)
    print(type(info))


def get_order_info():
    order_num = input("please input order number: ")
    customer_name = input("please input customer name: ")
    customer_id = input("please input customer id:")
    order_total_amount = float(input("please input order total amount: "))
    discount = float(input("please input discount: "))
    goods_recevie = input("please input good recevie: ")
    goods_recevie_phone = input("please input good receive phone number: ")
    province = input("please input province: ")
    city = input("please input city: ")
    region = input("please input region: ")
    address = input("please input address: ")
    tax_info = input("please input taxinfo:")
    order_info = "订单号：{}\n客户名：{}\n客户id:{}\n订单总额：{}\n折扣：{}\n收货人：{}\n收货人手机号：{}\n收货地址：{}{}{}{}\n发票信息：{}"
    order_info = order_info.format(order_num, customer_name, customer_id, order_total_amount, discount, goods_recevie,
                                   goods_recevie_phone,
                                   province, city, region, address, tax_info)
    print(order_info)


if __name__ == '__main__':
    # test_str()
    get_order_info()
